home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
utils
/
unix
/
unzip-5.12
/
zipinfo.doc
< prev
next >
Wrap
Text File
|
1994-08-24
|
21KB
|
450 lines
ZIPINFO(1L) MISC. REFERENCE MANUAL PAGES ZIPINFO(1L)
NAME
zipinfo - list detailed information about a ZIP archive
SYNOPSIS
zipinfo [-12smlvhtTz] file[.zip] [file(s) ...]
[-x xfile(s) ...]
unzip -Z [-12smlvhtTz] file[.zip] [file(s) ...]
[-x xfile(s) ...]
DESCRIPTION
zipinfo lists technical information about files in a ZIP
archive, most commonly found on MS-DOS systems. Such infor-
mation includes file access permissions, encryption status,
type of compression, version and operating system or file
system of compressing program, and the like. The default
behavior (with no options) is to list single-line entries
for each file in the archive, with header and trailer lines
providing summary information for the entire archive. The
format is a cross between Unix ``ls -l'' and ``unzip -v''
output. See DETAILED DESCRIPTION below. Note that zipinfo
is the same program as unzip (under Unix, a link to it); on
some systems, however, zipinfo support may have been omitted
when unzip was compiled.
ARGUMENTS
file[.zip]
Path of the ZIP archive(s). If the file specification
is a wildcard, each matching file is processed in an
order determined by the operating system (or file sys-
tem). Only the filename can be a wildcard; the path
itself cannot. Wildcard expressions are similar to
Unix egrep(1) (regular) expressions and may contain:
* matches a sequence of 0 or more characters
? matches exactly 1 character
[...]
matches any single character found inside the
brackets; ranges are specified by a beginning
character, a hyphen, and an ending character. If
an exclamation point or a caret (`!' or `^') fol-
lows the left bracket, then the range of charac-
ters within the brackets is complemented (that is,
anything except the characters inside the brackets
is considered a match).
(Be sure to quote any character which might otherwise
be interpreted or modified by the operating system,
particularly under Unix and VMS.) If no matches are
found, the specification is assumed to be a literal
Info-ZIP Last change: 28 Aug 94 (v2.02) 1
ZIPINFO(1L) MISC. REFERENCE MANUAL PAGES ZIPINFO(1L)
filename; and if that also fails, the suffix .zip is
appended. Note that self-extracting ZIP files are sup-
ported; just specify the .exe suffix (if any) expli-
citly.
[file(s)]
An optional list of archive members to be processed.
Regular expressions (wildcards) may be used to match
multiple members; see above. Again, be sure to quote
expressions that would otherwise be expanded or modi-
fied by the operating system.
[-x xfile(s)]
An optional list of archive members to be excluded from
processing.
OPTIONS
-1 list filenames only, one per line. This option
excludes all others; headers, trailers and zipfile com-
ments are never printed. It is intended for use in
Unix shell scripts.
-2 list filenames only, one per line, but allow headers
(-h), trailers (-t) and zipfile comments (-z), as well.
This option may be useful in cases where the stored
filenames are particularly long.
-s list zipfile info in short Unix ``ls -l'' format. This
is the default behavior; see below.
-m list zipfile info in medium Unix ``ls -l'' format.
Identical to the -s output, except that the compression
factor, expressed as a percentage, is also listed.
-l list zipfile info in long Unix ``ls -l'' format. As
with -m except that the compressed size (in bytes) is
printed instead of the compression ratio.
-v list zipfile information in verbose, multi-page format.
-h list header line. The archive name, actual size (in
bytes) and total number of files is printed.
-t list totals for files listed or for all files. The
number of files listed, their uncompressed and
compressed total sizes, and their overall compression
factor is printed; or, if only the totals line is being
printed, the values for the entire archive are given.
Note that the total compressed (data) size will never
match the actual zipfile size, since the latter
includes all of the internal zipfile headers in addi-
tion to the compressed data.
Info-ZIP Last change: 28 Aug 94 (v2.02) 2
ZIPINFO(1L) MISC. REFERENCE MANUAL PAGES ZIPINFO(1L)
-T print the file dates and times in a sortable decimal
format (yymmdd.hhmmss). The default date format is a
more standard, human-readable version with abbreviated
month names (see examples below).
-z include the archive comment (if any) in the listing.
DETAILED DESCRIPTION
zipinfo has a number of modes, and its behavior can be
rather difficult to fathom if one isn't familiar with Unix
ls(1) (or even if one is). The default behavior is to list
files in the following format:
-rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660
The last three fields are the modification date and time of
the file, and its name. The case of the filename is
respected; thus files which come from MS-DOS PKZIP are
always capitalized. If the file was zipped with a stored
directory name, that is also displayed as part of the
filename.
The second and third fields indicate that the file was
zipped under Unix with version 1.9 of zip. Since it comes
from Unix, the file permissions at the beginning of the line
are printed in Unix format. The uncompressed file-size
(2802 in this example) is the fourth field.
The fifth field consists of two characters, either of which
may take on several values. The first character may be
either `t' or `b', indicating that zip believes the file to
be text or binary, respectively; but if the file is
encrypted, zipinfo notes this fact by capitalizing the char-
acter (`T' or `B'). The second character may also take on
four values, depending on whether there is an extended local
header and/or an ``extra field'' associated with the file
(fully explained in PKWare's APPNOTE.TXT, but basically
analogous to pragmas in ANSI C--i.e., they provide a stan-
dard way to include non-standard information in the
archive). If neither exists, the character will be a hyphen
(`-'); if there is an extended local header but no extra
field, `l'; if the reverse, `x'; and if both exist, `X'.
Thus the file in this example is (probably) a text file, is
not encrypted, and has neither an extra field nor an
extended local header associated with it. The example
below, on the other hand, is an encrypted binary file with
an extra field:
RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644
Extra fields are used for various purposes (see discussion
of the -v option below) including the storage of VMS file
Info-ZIP Last change: 28 Aug 94 (v2.02) 3
ZIPINFO(1L) MISC. REFERENCE MANUAL PAGES ZIPINFO(1L)
attributes, which is presumably the case here. Note that
the file attributes are listed in VMS format. Some other
possibilities for the host operating system (which is actu-
ally a misnomer--host file system is more correct) inc